<!DOCTYPE html>
<html>

<head>
    <style>

    </style>
    <script>
    </script>
</head>

<body>
    <p id="p2">Hello World!</p>
    <script>
        document.getElementById("p2").style.color = "blue";
        document.getElementById("p2").style.fontSize = "larger";
        //document.getElementById(id).style.property=新样式
        //通过style.property=""来设置元素属性
    </script>


</body>

</html>